<?php
class GroupsController extends AppController{
	public function create(){
		if($this->request->is('post')){
			$this->Group->create();
			if($this->Group->save($this->request->data)){
				$this->Session->setFlash(__('Created group sucessfully'));
				return $this->redirect(array('action' => 'create'));
			}
			$this->Session->setFlash(__('Unable to create group.'));
		}
	}
	
 	public function beforeFilter() {
		parent::beforeFilter();
	
		// For CakePHP 2.0
		//$this->Auth->allow('*');
	
		// For CakePHP 2.1 and up
		//$this->Auth->allow();
	} 
}